package com.ag.bean;

import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * TbPlanType entity.
 * 
 * @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "TB_PLAN_TYPE", schema = "dbo", catalog = "AGDB")
public class TbPlanType implements java.io.Serializable {

	// Fields

	private String ptId;
	private String ptName;
	private String ptDetail;
	private String a;
	private String b;
	private String c;
	private Set<TbPlan> tbPlans = new HashSet<TbPlan>(0);

	// Constructors

	/** default constructor */
	public TbPlanType() {
	}

	/** minimal constructor */
	public TbPlanType(String ptId, String ptName) {
		this.ptId = ptId;
		this.ptName = ptName;
	}

	/** full constructor */
	public TbPlanType(String ptId, String ptName, String ptDetail, String a,
			String b, String c, Set<TbPlan> tbPlans) {
		this.ptId = ptId;
		this.ptName = ptName;
		this.ptDetail = ptDetail;
		this.a = a;
		this.b = b;
		this.c = c;
		this.tbPlans = tbPlans;
	}

	// Property accessors
	@Id
	@Column(name = "PT_ID", unique = true, nullable = false, length = 10)
	public String getPtId() {
		return this.ptId;
	}

	public void setPtId(String ptId) {
		this.ptId = ptId;
	}

	@Column(name = "PT_NAME", nullable = false, length = 20)
	public String getPtName() {
		return this.ptName;
	}

	public void setPtName(String ptName) {
		this.ptName = ptName;
	}

	@Column(name = "PT_DETAIL", length = 50)
	public String getPtDetail() {
		return this.ptDetail;
	}

	public void setPtDetail(String ptDetail) {
		this.ptDetail = ptDetail;
	}

	@Column(name = "A", length = 50)
	public String getA() {
		return this.a;
	}

	public void setA(String a) {
		this.a = a;
	}

	@Column(name = "B", length = 50)
	public String getB() {
		return this.b;
	}

	public void setB(String b) {
		this.b = b;
	}

	@Column(name = "C", length = 50)
	public String getC() {
		return this.c;
	}

	public void setC(String c) {
		this.c = c;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tbPlanType")
	public Set<TbPlan> getTbPlans() {
		return this.tbPlans;
	}

	public void setTbPlans(Set<TbPlan> tbPlans) {
		this.tbPlans = tbPlans;
	}

}